<?php

namespace App\Console\Commands;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;
use App\Scopes\DeleteScope;
class HospitalAppointInterval extends Model
{
    use HasDateTimeFormatter;

    protected $fillable = ['start', 'end', 'hospital_id','hospital_appoint_id','is_deleted'];

    protected $table = 'eb_hospital_appoint_interval';

    public function hospitals_appoint()
    {
        return $this->belongsTo(HospitalAppoint::class, 'hospital_appoint_id');
    }

    public function num()
    {
        return $this->hasone(HospitalAppointIntervalNum::class, 'id', 'interval_id');
    }
}
